package Sort;

import java.util.Scanner;

/**
 * @author Liangyaoyun
 */
public class QuickSortSimple {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = scanner.nextInt();
        }
        quickSort(nums);
        for (int i = 0; i < n; i++) {
            if (i == n - 1) {
                System.out.println(nums[i]);
            } else {
                System.out.print(nums[i] + " ");
            }
        }
    }

    public static void quickSort(int[] nums) {
        quickSortInner(nums, 0, nums.length - 1);
    }

    private static void quickSortInner(int[] nums, int start, int end) {

        int tmp;

        int i = start;
        int j = end;

        while (i < j) {
            while (i < j && nums[j] >= nums[i]) {
                j--;
            }
            if (i < j) {
                tmp = nums[i];
                nums[i] = nums[j];
                nums[j] = tmp;
            }

            while (i < j && nums[i] <= nums[j]) {
                i++;
            }
            if (i < j) {
                tmp = nums[i];
                nums[i] = nums[j];
                nums[j] = tmp;
            }
        }
    }
}
